<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>qrcode</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<style>
			.qrcode-content {
        width: 100%;
        height: 400px;
        background-color: gainsboro;
      }
      .qrcode-btn {
        width: 80%;
        height: 60px;
        font-size: 24px;
        position: absolute;
        bottom: 10px;
        margin: 10px;
        background-color: red;
      }
    </style>
	</head>
	<body>
		<div class="qrcode-content" id="qrcodeContent">result...</div>
		<button type="button" class="qrcode-btn" onclick="clickBtn()">
			调用原生扫描二维码
		</button>
		<!-- 手机浏览器控制台调试神器 webBridgeSDK调试模式依赖vconsole-->
		<script src="js/vconsole.min.js"></script>
		<script src="js/webBridgeSDK.js"></script>
		<script>
			(function(window,undefined){
				//-----日志打印调试配置-----
				//默认不打印日志
				window.webBridgeLoging=true;
			    //开启调试模式
				var vConsole = new VConsole();
				//-----日志打印调试配置-----
			})(window);
			function clickBtn() {
				//创建二维码调用
				window.webBridge.scanQrcode(function callback(data) {
					//回调函数
					document.getElementById("qrcodeContent").innerHTML = data;
				});
			}
		</script>
	</body>
</html>
